package com.kcwoo.shaokun.rxjavalearning.arc

import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleObserver
import android.arch.lifecycle.OnLifecycleEvent
import android.util.Log

/**
 * Created by kevin on 2017/11/8.
 *  step one small every day
 */
class MyObserver : LifecycleObserver {


    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    fun do1() {
        Log.d("akun", "do1 绑定了这个类 将在ON_START的时候调用")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    fun do2() {
        Log.d("akun", "do2 绑定了这个类 将在ON_RESUME的时候调用")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    fun do3() {
        Log.d("akun", "do3 绑定了这个类 将在ON_STOP的时候调用")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    fun do4() {
        Log.d("akun", "do4 绑定了这个类 将在ON_PAUSE的时候调用")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    fun do5() {
        Log.d("akun", "do5 绑定了这个类 将在ON_DESTROY的时候调用")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_ANY)
    fun do6() {

        Log.d("akun", "do6 绑定了这个类 将在ON_ANY的时候调用")


    }
}